import {request} from "../request";

export function getMenuList(){
    return request({
        url:'/sys/menu/nav',
        method:'get'
    })
}
export function getMenuPermissions(){
    return request({
        url:'/sys/menu/permissions',
        method:'get'
    })
}

export function getMenuListByType(type){
    return request({
        url:'/sys/menu/list',
        method:'get',
        data:type
    })
}

export function getMenu(id){
    return request({
        url:`/sys/menu/${id}`,
        method:'get'
    })
}

export function postMenu(data){
    return request({
        url:`/sys/menu`,
        method:'post',
        data:data
    })
}
export function putMenu(data){
    return request({
        url:`/sys/menu`,
        method:'put',
        data:data
    })
}

export function getMenuSelect(data){
    return request({
        url:`/sys/menu/select`,
        method:'get'
    })
}